{% extends 'skeleton.html' %}

{% block head %}
  <title>{{ site.name }} - {% block page_title %}{% endblock %}</title>
  <link href="/favicon.ico" type="image/x-icon" rel="shortcut icon" />
  {% block stylesheets %}
    <link href="/media/css/base.css" type="text/css" rel="stylesheet" />
  {% endblock %}
  {% block feeds %}{% endblock %}
  {% block scripts %}
     <script type="text/javascript" src="/media/js/base.js" ></script>
  {% endblock %}
{% endblock %}

{% block body %}
<div class="heading">
  <a class="logo" href="/"><img src="/media/img/nameplate-24.png" alt="{{ site.name }}" /></a>
  <span class="sep">:</span>
  <span class="title">{% block head_title %}{% endblock %}</span>
  
  <ul>
    <li><input type="text" id="search" /></li>

    {% if user.is_authenticated %}
      <li>&bull; Welcome, {{ user.get_full_name|escape }}.</li>
    {% else %}
      {% block logged-out-status %}{% endblock %}
    {% endif %}

    {% block feedback-nav %}<li>&raquo; <a href="/feedback/?ref={{ request.path }}">Feedback</a></li>{% endblock %}
    <li>&raquo; <a href="/doc/">About</a></li>
    <li>&raquo; <a href="/blog/">Blog</a></li>

    {% if user.is_authenticated %}
      <li>&raquo; <a href="/account/">Profile</a></li>
      <li>&raquo; <a href="/account/logout/">Log out</a></li>
    {% else %}
      {% block login-nav %}
        <li>&raquo; <a href="/account/login/">Log in</a></li>
        <li>&raquo; <a href="/account/register/">Register</a></li>
      {% endblock %}
    {% endif %}
  </ul>
</div>
{% block content %}
{% endblock %}
<div class="footer">
  The design and implementation of the {{ site.name }} service is Copyright &copy; 2003-2007 Micah Dowty. <br />
  All hosted messages and metadata are owned by their respective authors.
</div>

<script type="text/javascript">
{% block scripts-init %}
  CIASearch.init("/api/search/", "search", "Search {{ site.name }}");
{% endblock %}
</script>

{% if GOOGLE_ANALYTICS_ACCOUNT %}
<script
   {% if request.is_secure %}
     src="https://ssl.google-analytics.com/urchin.js"
   {% else %}
     src="http://www.google-analytics.com/urchin.js"
   {% endif %}
   type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "{{ GOOGLE_ANALYTICS_ACCOUNT }}";
urchinTracker();
</script>
{% endif %}

{% endblock %}
